from selenium.webdriver.common.by import By
from pages.base_page import BasePage
class HomePage(BasePage):
    # 定位任务按钮
    rw_locator = (By.LINK_TEXT, '任务')
    #定位日程按钮
    rc_locator = (By.LINK_TEXT,'日程')
    #定位更多按钮
    gd_locator = (By.LINK_TEXT,'更多')
    #定位日志按钮
    rz_locator = (By.LINK_TEXT,'日志')
    #定位知识按钮
    zs_locator = (By.LINK_TEXT,'知识')
    #定位站内信按钮
    znx_locator = (By.LINK_TEXT,'站内信')
    #定位公告管理按钮
    gg_locator = (By.LINK_TEXT,'公告管理')
    #点击任务按钮
    def rw_click(self):
        self.driver.find_element(*self.rw_locator).click()
    #点击日程按钮
    def rc_click(self):
        self.driver.find_element(*self.rc_locator).click()
    #点击日志按钮
    def rz_click(self):
        self.driver.find_element(*self.gd_locator).click()
        self.driver.find_element(*self.rz_locator).click()
    #点击知识按钮
    def zs_click(self):
        self.driver.find_element(*self.gd_locator).click()
        self.driver.find_element(*self.rc_locator).click()
    #点击站内信按钮
    def znx_click(self):
        self.driver.find_element(*self.gd_locator).click()
        self.driver.find_element(*self.rc_locator).click()
    #点击公告管理按钮
    def gg_click(self):
        self.driver.find_element(*self.gd_locator).click()
        self.driver.find_element(*self.rc_locator).click()